package com.example.repeatsubmit.utils;

import com.example.repeatsubmit.annotation.MyConstrant;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author caoqianhuan
 * @date 2022/8/30
 * @Description:
 */
public class MyValidator implements ConstraintValidator<MyConstrant, Object> {
    @Override
    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
        System.out.println(o);
        if (o.equals("a")) {
            return true;
        }
        return false;
    }
}
